package com.example.administrator.familfinalcialmanagement.util.dialog;

import android.content.Context;
import android.databinding.DataBindingUtil;
import android.view.LayoutInflater;
import android.view.View;

import com.example.administrator.familfinalcialmanagement.R;
import com.example.administrator.familfinalcialmanagement.databinding.DialogInCommonBinding;
import com.example.administrator.familfinalcialmanagement.util.listener.OnBHClickListener;
/**
 * Created by Administrator on 2019/3/4.
 */

public class InCommonDialog extends BaseDialog {

    Context context;
    DialogInCommonBinding inComminBinding ;
    OnBHClickListener onBHClickListener;

    public InCommonDialog(Context context) {
        super(context);
        this.context = context;
        inComminBinding = DataBindingUtil.inflate(LayoutInflater.from(context), R.layout.dialog_in_common,null,false);
        inComminBinding.setDialog(this);
        setContentView(inComminBinding.getRoot());
    }

    public void setOnBHClickListener(OnBHClickListener onBHClickListener) {
        this.onBHClickListener = onBHClickListener;
    }

    //继续上工
    public void noPoint(View view){
        if (onBHClickListener != null) {
            onBHClickListener.onCloseClick();
        }
        dismiss();
    }

    //查看上工
    public void okPoint(View view){
        if (onBHClickListener != null) {
            onBHClickListener.onConfirmClick();
        }
        dismiss();
    }

    //设置标题的颜色
    public void setTitleText(String str){
        inComminBinding.dialogRemind.setText(str);
    }

}

